{% extends "sentry/layout.html" %}
{% block wrapperclass %}admin{% endblock %}

{% load i18n %}
{% load sentry_helpers %}

{% block title %}{% trans "Admin" %} | {{ block.super }}{% endblock %}

{% block sidebar %}
    <h6 class="nav-header">{% trans "System" %}</h6>
    <ul class="nav nav-stacked">
        <li><a href="{% absolute_uri '/manage/' %}">{% trans "Overview" %}</a></li>
        <li><a href="{% absolute_uri '/manage/buffer/' %}">{% trans "Buffer" %}</a></li>
        <li><a href="{% absolute_uri '/manage/queue/' %}">{% trans "Queue" %}</a></li>
        <li{% block admin-nav-status %}{% endblock %}><a href="{% url 'sentry-admin-status' %}">{% trans "Environment" %}</a></li>
        <li{% block admin-nav-packages %}{% endblock %}><a href="{% url 'sentry-admin-packages-status' %}">{% trans "Packages" %}</a></li>
        <li{% block admin-nav-mail %}{% endblock %}><a href="{% url 'sentry-admin-mail-status' %}">{% trans "Mail" %}</a></li>
        <li><a href="{% absolute_uri '/manage/settings/' %}">{% trans "Settings" %}</a></li>
        <li{% block admin-nav-warnings %}{% endblock %}><a href="{% url 'sentry-admin-warnings-status' %}">Warnings</a></li>
    </ul>

    <h6 class="nav-header">{% trans "Manage" %}</h6>
    <ul class="nav nav-stacked">
        <li><a href="{% absolute_uri '/manage/organizations/' %}">{% trans "Organizations" %}</a></li>
        <li><a href="{% absolute_uri '/manage/projects/' %}">{% trans "Projects" %}</a></li>
        <li><a href="{% absolute_uri '/manage/users/' %}">{% trans "Users" %}</a></li>
    </ul>

    {% with plugins=PLUGINS.for_site|as_sorted %}
        {% if plugins %}
            <h6 class="nav-header">{% trans "Plugins" %}</h6>
            <ul class="nav nav-stacked">
                {% for p in PLUGINS.for_site %}
                    <li{% if plugin and plugin.slug == p.slug %} class="active"{% endif %}>
                        <a href="{% url 'sentry-admin-configure-plugin' p.slug %}">{{ p.get_conf_title }}</a>
                    </li>
                {% endfor %}
            </ul>
        {% endif %}
    {% endwith %}
{% endblock %}
